<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .con{
            position: relative;
            width: 200px;
            height: 200px;
            padding: 10px;
            border: 10px solid red;
            margin: 100px 0 0 50px;
            overflow: auto;

        }
        .min{
            width: 100px;
            height: 600px;
            /* padding: 10px; */
            border: 10px solid red;
        }
    </style>
</head>
<body>
    <div class="con">
        <div class="min">我是内部的</div>
    </div>
    <script>
        var a=document.querySelector(".con");
        console.log("offsetHeight-------------"+a.offsetHeight);
        console.log("offsetWidth-------------"+a.offsetWidth);
        console.log("offsetLeft-------------"+a.offsetLeft);
        console.log("offsetTop-------------"+a.offsetTop);
        console.log("clientHeight-------------"+a.clientHeight);
        console.log("clientWidth-------------"+a.clientWidth);
        console.log("scrollHeight---------------"+a.scrollHeight);
        console.log("scrollWidth---------------"+a.scrollWidth);
        console.log("scrollTop---------------"+a.scrollTop);
        console.log("scrollLeft---------------"+a.scrollLeft);
        //滚动条出现[不算client的部分] 宽度会受影响 left 和clientWidth----滚条17px宽度
        var all= a.getBoundingClientRect();
        console.log(all); 
        a.onclick=function(){
            this.scrollTop=200;
            console.log("top----"+this.scrollTop);
            console.log("left----"+this.scrollLeft);
        }
        window.getComputedStyle(a);
        console.log(window.getComputedStyle(a,":after"));
    </script>


</body>
</html>